<?php


require "database.php";


$base=new Db;

$title      =$_POST["title"];
$media_type =$_POST["media_type"];
$content    =$_POST["content"];
$intro      =$_POST["intro"];
$admin_id   =$_POST["admin_id"];

$__ad__=$base->doSql('insert into ey_ad set title="'.$title.'",media_type="'.$media_type.'",content="'.$content.'",intro="'.$intro.'",add_time="'.time().'",admin_id="'.$admin_id.'",status=1');



if($__ad__){
    return json([
        "code"=>200
    ]);
}else{
    return json([
        "code"=>-1
    ]);
}